define(function(require, exports, module) {

  var Backbone = require('backbone');
  var $ = require('jquery');
  var _ = require('underscore');
  var jsonview = require('jsonview');
  require('css!hy5b/frontend/jsonview/jsonview.css')

  var EventEmitter = require('eventemitter3')

  var eve1 = new EventEmitter()
  var eve2 = new EventEmitter()
  var eve3 = new EventEmitter()

  function main() {
    var $app = $('<div id="app">');
    $('#main').html($app);

    var logger = p.getLogger($app[0])

    function on(eve, ok) {
      logger.info('on', eve, ok)
    }

    function on2(eve, ok) {
      logger.info('on2', eve, ok)
    }

    eve1.on('ok', on)
    //listener为同一函数时在removeListener时会被全部移除
    //若不为同一函数时则不会被全部移掉
    eve1.on('ok', on2)
    eve2.on('ok', on)
    eve3.on('ok', on)

    eve1.emit('ok', 1111111)
    eve2.emit('ok', 2222222)
    eve3.emit('ok', 3333333)

    eve1.removeListener('ok', on)

    eve1.emit('ok', 1111111)
    eve2.emit('ok', 2222222)
    eve3.emit('ok', 3333333)
  }

  return main;
})
